package com.myplaces.server;

import java.io.IOException;
import java.net.URL;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.urlfetch.HTTPResponse;
import com.google.appengine.api.urlfetch.URLFetchService;
import com.google.appengine.api.urlfetch.URLFetchServiceFactory;

@SuppressWarnings("serial")
public class GeoDataServlet extends HttpServlet {
	
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
            throws IOException {
        resp.setContentType("text/xml");
        //http://picasaweb.google.com/data/feed/base/user/achautard
        URLFetchService s = URLFetchServiceFactory.getURLFetchService();
        HTTPResponse r = s.fetch(new URL("http://picasaweb.google.com/data/feed/base/user/achautard"));
        String st = new String(r.getContent());
        resp.getWriter().write(st);
    }
}
